## Paths where packages are installed

This Window shows the paths where packages are installed by PackMan.

Each entry shows the Logical name of the path used in the package along with the location on disc it is mapped to.

The Open button will open a filer window for the currently selected path. If the path contains the special "@" character it is not possible to open the path in this way so a message will be shown instead.

The Move button allows you to move the logical path to refer to a new location. It only allows this if the current location is not part of the !Boot structure.

When "Move" is selected it shows a window that allows you to specify the new location of the path. Type in a new name and/or drag the folder icon to the new location. Once dragged or the Save button is pressed the Move Path Window will be shown and any files installed in the old path will be moved to the new path. A check that that no files will be overwritten is done as part of this process.

The Add button allows you to add a new logical path to the list of paths. The path added must be a child of another logical path. A new window will be opened in which you can enter the logical path name and the new location. Dragging the folder icon to a filer directory will fill in the directory for the new location. Once dragged or the Save button is pressed the Move Path Window will be shown and any files installed at or below the new logical path will be checked to see if they need to be moved and then moved to the new location on disc if necessary. A check that no files will be overwritten is done as part of this process.

For example, you may want to have all the games in a the $.Games directory instead of in the default $.Apps.Games directory on your disc. To do this add a new path called Apps.Games, set the location to Games and drag the directory folder to the $ directory on your hard disc. Any games you already have installed into $.Apps.Games will be moved to $.Games. Any game installed after this will be placed in the $.Games directory.

The Remove button allows you to remove an existing logical path from the list of paths. Only paths that are the child of another logical path can be removed. You will be prompted to check you are sure you wish to remove the path and if you continue the Move Path Window will be shown and any files installed which were in the removed path will have there location on disc reevaluated and will be moved if necessary. A check that no files will be overwritten is done as part of this process. If the directory for the path doesn't exist on disc the logical path will be deleted without showing the Move Path Window.

The Show Definitions option button toggles the display between showing the path used and the definition of the path in the `Paths` file.

## Changing the paths manually

The installation paths should normally be changed through the PackMan user interface, but if you want to do it manually use the following instructions. This is not recommended for anything but the `Apps` and `Manuals` paths.

The file `!Boot.Resources.!Packages.Paths` contains a list of mappings from logical to physical pathnames. Logical pathnames are those used within the package file. For example, `System.310.Modules.CLib` refers to a location within the active `!System` folder without making any assumption as to the physical location of that folder.

Each line of the `paths` file consists of a logical pathname, followed by an equals-sign, followed by a physical pathname. These components must be separated by whitespace. For example:

`RiscPkg = <Packages$Dir>.Info.@
Apps = <Boot$Dir>.^.Apps
System = <System$Dir>
SysVars = <Packages$Dir>.SysVars
`

Comments are introduced by a hash character. Blank lines are ignored. Each logical and physical pathname acts as the root of a sub-tree and applies to any file within that sub-tree. If two or more logical pathnames match then the longest one is used. An at-sign is converted into the name of the package to which the file belongs, so the file `RiscPkg.Control` from the package `Foo` would become `<Packages$Dir>.Info.Foo.Control`.

In principle you are free to choose any mappings you wish and the package manager will act accordingly. In practice, the scope for doing so is fairly limited if you want installed packages to work afterwards. The best way to ensure correct behaviour is to refer to locations indirectly using system variables. For example, the mapping given above for `System` will work even if the system folder moves.

One path that is freely changable is `Apps`. This is where applications are installed, and there is no requirement for them to be placed in any particular location. However the location you choose should not be used for any other purpose: if you want to mix applications and user data in the same directory then create symbolic links to the applications.

If you supply a `Paths` file then it takes precedence over the default but does not necessarily replace it. Any paths that you do not specify will continue to use the default mapping.

Be aware that if you change the `Paths` file while there are packages installed, you must make corresponding changes to the physical filesystem (otherwise `PackMan` will not be able to perform upgrades correctly). If you use the PackMan "Move" button above it will update the filesystem for you.

Warning:Older versions of !PackMan (0.6 and earlier) and !RiscPkg (0.4.0 and earlier) had their own choices folder with their own copies of the `Paths` file. You should upgrade both programs so they share a common paths file.